package com.logAndSignConsummer.controller;

import com.logAndSignConsummer.service.UserServiceFeign;
import entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user")
@CrossOrigin
public class UserController {
    @Autowired
    private UserServiceFeign userServiceFeign;

    @RequestMapping("/findAllUser")
    public String findAllUser(@RequestBody User user) {
        String allUser = userServiceFeign.findAllUser(user);
        return allUser;
    }
}
